home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / smail-3.1.28 / src / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-16  |  50.5 KB  |  1,508 lines

  1. /* @(#)src/config.h    1.28 9/16/92 09:10:22 */
  2.  
  3. /*
  4.  *    Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
  5.  *    Copyright (C) 1992  Ronald S. Karr
  6.  * 
  7.  * See the file COPYING, distributed with smail, for restriction
  8.  * and warranty information.
  9.  */
  10.  
  11. /*
  12.  * NOTE:
  13.  *    This file contains default values for a large number of
  14.  *    configurable values in smail.  THIS FILE IS NOT INTENDED TO
  15.  *    BE EDITED DIRECTLY.  Rather, users wishing to override
  16.  *    default values should use the conf/EDITME file.  Either
  17.  *    the MISC_DEFINES or the MISC_C_DEFINES list variable can
  18.  *    be used to override values in this file.
  19.  *
  20.  *    This file contains two primary types of variables: variables
  21.  *    which can be left undefined, and variables which must have a
  22.  *    value.  For variables of the former type, two macros can be
  23.  *    defined in the EDITME file: a value can be specified, or the
  24.  *    variable can be disabled by using a macro prefix of NO_.  For
  25.  *    example, to set LIST_FILENAME to /usr/local/lists/${lc:user},
  26.  *    use:
  27.  *
  28.  *       MISC_C_DEFINES='#define LIST_FILENAME "/usr/local/lists/${lc:user}'
  29.  *
  30.  *    To disable the use of a list director:
  31.  *
  32.  *       MISC_DEFINES=NO_LIST_FILENAME
  33.  *
  34.  *    The other type of variable (variables that must have values)
  35.  *    cannot be turned off with a NO_ macro.
  36.  */
  37.  
  38.  
  39. /*
  40.  * SITENAME CONFIGURATION
  41.  *
  42.  * The following section defines the various possible names for the
  43.  * local host which are recognized and produced implicitly by smail
  44.  */
  45.  
  46. /*
  47.  * Define the full domain name for the local site used in outgoing
  48.  * addresses within header fields.  If VISIBLE_NAME is set to NULL, then
  49.  * the the address used will be the first name in the list HOSTNAMES.  If
  50.  * HOSTNAMES is also NULL, then a hostname will be computed in a system-
  51.  * dependent fashion and VISIBLE_DOMAINS used to build HOSTNAMES and
  52.  * VISIBLE_NAME in the form <hostname>.VISIBLE_DOMAINS.  VISIBLE_NAME
  53.  * should be a domain name which which remote sites will understand.
  54.  *
  55.  * VISIBLE_NAME does not need to specifically specify the local host.  It
  56.  * can be the domain name for a set of hosts which maintain a consistent
  57.  * user database or automatically forward to the homes for all users
  58.  * within the domain.
  59.  *
  60.  * NOTE: This can be set with the config file value "visible_name"
  61.  *
  62.  * # define VISIBLE_NAME    "uts.amdahl.com" (* Sample *)
  63.  */
  64. #ifndef    VISIBLE_NAME
  65. # define VISIBLE_NAME NULL        /* Normal setting */
  66. #endif
  67.  
  68. /*
  69.  * The value of VISIBLE_DOMAINS may be used to create the HOSTNAMES and
  70.  * VISIBLE_NAMES values.  VISIBLE_DOMAINS can be a list of colon-separated
  71.  * values.  The first value will be used in generating VISIBLE_DOMAINS,
  72.  * the first and remaining values will be used in generating HOSTNAMES.
  73.  * For a host in the UUCP zone which is in the maps distributed over
  74.  * USENET in comp.mail.maps, one of these values should be "uucp".
  75.  * For a host in a registered domain, this should contain the domain in
  76.  * which the host is registered.
  77.  *
  78.  * CAUTION:  for newly registered domains "uucp" should be first in this
  79.  *         list for a month or two, to allow for propogation of the
  80.  *         new domain name around the various networks.
  81.  *
  82.  * NOTE: This can be set with the config file value "visible_domains"
  83.  *
  84.  * # define VISIBLE_DOMAINS "amdahl.com:uucp" (* sample *)
  85.  * # define VISIBLE_DOMAINS "Berkeley.EDU" (* sample site not in UUCP zone *)
  86.  */
  87. #ifndef    VISIBLE_DOMAINS
  88. # define VISIBLE_DOMAINS "uucp"        /* for a host in the UUCP zone */
  89. #endif
  90.  
  91. /*
  92.  * A colon-separated list of names for the local host.  This list,
  93.  * together with VISIBLE_NAME, UUCP_HOST and MORE_HOSTNAMES should
  94.  * represent all possible names for the local host.  For a host that
  95.  * is in more than one domain or that can gateway to more than one
  96.  * level of domains, this should represent those names.  For a host in
  97.  * a registered domain in the UUCP zone, which is also in the maps
  98.  * distributed by USENET, <hostname>.uucp should be in this list.
  99.  *
  100.  * If HOSTNAMES is non-NULL then VISIBLE_DOMAINS is ignored.  If
  101.  * HOSTNAMES is non-NULL and VISIBLE_NAME is NULL, then the first
  102.  * value in HOSTNAMES is used to create the VISIBLE_NAME.
  103.  *
  104.  * Also, the first value in HOSTNAMES is used to specify the primary
  105.  * domain name for the local host.  This name should uniquely
  106.  * specify the local host and is used in tracing headers and in
  107.  * forming the Message-Id.
  108.  *
  109.  * NOTE: This can be set with the config file value "hostnames"
  110.  *
  111.  * # define HOSTNAMES    "amdahl.uts.amdahl.com:amdahl.uucp" (* sample *)
  112.  */
  113. #ifndef    HOSTNAMES
  114. # define HOSTNAMES    NULL        /* normal setting */
  115. #endif
  116.  
  117. /*
  118.  * A colon-separated list of yet more names for the local host.  This
  119.  * list can be used to specify names in addition to those names computed
  120.  * from the VISIBLE_DOMAINS values crossed with the real hostname.  Thus,
  121.  * if a site (especially a domain gateway) wishes to have one set of
  122.  * names computed automatically from the machines real hostname, while
  123.  * also recognizing an additional set of names, HOSTNAMES can be set to
  124.  * NULL (causing it to be computed) and MORE_HOSTNAMES can be set to the
  125.  * list of additional hostnames.
  126.  *
  127.  * NOTE: This can be set with the config file value "more_hostnames"
  128.  *
  129.  * #define MORE_HOSTNAMES    "uts.amdahl.com:amdahl.com" (* sample *)
  130.  */
  131. #ifndef MORE_HOSTNAMES
  132. # define MORE_HOSTNAMES    NULL        /* normal setting */
  133. #endif
  134.  
  135. /*
  136.  * The hostname used in !-routes in the `From_' lines before the header.
  137.  * Set to NULL if this should be computed in a system-dependent fashion.
  138.  *
  139.  * NOTE: This can be set with the config file value "uucp_name"
  140.  *
  141.  * # define UUCP_NAME    "amdahl"    (* Example *)
  142.  */
  143. #ifndef    UUCP_NAME
  144. # define UUCP_NAME NULL            /* Normal setting */
  145. #endif
  146.  
  147. /*
  148.  * A list of authoritative domains for this host can be configured
  149.  * by setting this to a colon-separated list of domains.
  150.  *
  151.  * NOTE: This can be set with the config file value "auth_domains".
  152.  */
  153.  
  154. #ifndef AUTH_DOMAINS
  155. # define AUTH_DOMAINS NULL        /* Normal setting */
  156. #endif
  157.  
  158.  
  159. /*
  160.  * STRONG SUGGESTIONS
  161.  *
  162.  * The following suggested values should probably not be changed,
  163.  * except to make them less restrictive.
  164.  */
  165.  
  166. /*
  167.  * maximum size for a message.  Messages longer than this are truncated.
  168.  * If you do not wish messages to be truncated at all, set this to zero.
  169.  *
  170.  * NOTE: This can be set with the config file value "max_message_size"
  171.  */
  172. #ifndef    MAX_MESSAGE_SIZE
  173. # define MAX_MESSAGE_SIZE    (100*1024)
  174. #endif
  175.  
  176. /*
  177.  * This string defines the grade values which correspond to particular
  178.  * names of the Precedence: field in the message header.  The parts of
  179.  * the string are separated by `:' with alternating precedence name and
  180.  * grade character.  Numbers are higher than upper case letters which are
  181.  * higher than lower case letters in their grade value.  Grades in the
  182.  * range [a-m] will only have an error message and header returned to the
  183.  * sender on errors.  Grades in the range [n-z] will not have anything
  184.  * returned to the sender on errors.
  185.  *
  186.  * The values recognized by many sendmail.cf files are: special-delivery,
  187.  * first-class and junk.  Others are useful mainly for getting mail out
  188.  * of the local machine or for communication with other hosts running
  189.  * smail in a similar configuration.
  190.  *
  191.  * NOTE: This can be set with the config file value "grades"
  192.  */
  193. #ifndef    GRADES
  194. # define GRADES "special-delivery:9:air-mail:A:first-class:C:bulk:a:junk:n"
  195. #endif
  196.  
  197. /*
  198.  * The maximum hop count allowed for remote delivery.  If a remote
  199.  * transport is called and the current hop_count is equal to or greater
  200.  * than this number, delivery fails.  This number does not affect local
  201.  * delivery (i.e., transports with the `local' attribute turned on).
  202.  *
  203.  * NOTE: This can be set with the config file value "max_hop_count"
  204.  *
  205.  * WARNING: this number is not standardized across all networks, so
  206.  *         return messages to senders will fail if an intermediate
  207.  *         site in the return path has a lower maximum hop count
  208.  *         then the sight initiating the "hop_count exeeded" error
  209.  *         message.
  210.  */
  211. #ifndef MAX_HOP_COUNT
  212. # define MAX_HOP_COUNT    20
  213. #endif
  214.  
  215.  
  216. /*
  217.  * PREFERENCES
  218.  *
  219.  * The following values can be changed at the preference of the local
  220.  * site administrator without affecting any remote sites, unless the
  221.  * administrator gets them wrong and causes mail to fail.
  222.  *
  223.  * NOTE: many suggested pathnames are in /usr/lib/smail and
  224.  *     /usr/spool/smail for compatibility with current naming
  225.  *     schemes used by other mailers and by netnews.  An
  226.  *     alternate suggestion is to group these files under one
  227.  *     directory /usr/smail.
  228.  */
  229.  
  230. /*
  231.  * This pathname is where the file COPYING from the source directory
  232.  * will be installed for reference by the -bc option to smail.  If
  233.  * this does not begin with `/', it will be referenced relative to
  234.  * smail_lib_dir.
  235.  *
  236.  * NOTE: This can be set with the config file value "copying_file"
  237.  */
  238. #ifndef COPYING_FILE
  239. # define COPYING_FILE "COPYING"
  240. #endif
  241.  
  242. /*
  243.  * Set this to the name of the system-wide log file to which potentially
  244.  * interesting, non-panic, messages are written.  This file should be
  245.  * truncated periodically.
  246.  *
  247.  * NOTE: This can be set with the config file value "logfile"
  248.  *
  249.  * # define LOGFILE "/usr/smail/log/logfile"  (* Alternate suggestion *)
  250.  */
  251. #ifndef    LOGFILE
  252. # define LOGFILE "/usr/spool/smail/log/logfile" /* Suggestion */
  253. #endif
  254.  
  255. /*
  256.  * Set this to the name of the system-wide smail panic log file.
  257.  * This file should be periodically reviewed by the system
  258.  * administrator to ensure that there are no major problems with
  259.  * the mail software, files or configuration.
  260.  *
  261.  * NOTE: This can be set with the config file value "panic_log"
  262.  *
  263.  * # define PANIC_LOG    "/usr/smail/log/panic" (* alternate suggestion *)
  264.  */
  265. #ifndef    PANIC_LOG
  266. # define PANIC_LOG    "/usr/spool/smail/log/paniclog" /* Suggestion */
  267. #endif
  268.  
  269. /*
  270.  * Set this to the name of the console device.  This is used as a last
  271.  * resort in attempting to write panic messages.
  272.  *
  273.  * NOTE: This can be set with the config file value "console"
  274.  */
  275. #ifndef    CONSOLE
  276. # define CONSOLE    "/dev/console"
  277. #endif
  278.  
  279. /*
  280.  * define the permission modes for the logfile and panic log file.
  281.  * If smail is not going to be run as set uid or set gid, this will
  282.  * have to be 0666.
  283.  *
  284.  * NOTE: This can be set with the config file value "log_mode"
  285.  */
  286. #ifndef LOG_MODE
  287. # define LOG_MODE 0644
  288. #endif
  289.  
  290. /*
  291.  * Set this to the spool directories for mail messages, more than one
  292.  * spool directory can be specified by separating names with the colon
  293.  * ( `:' ) character.  Spooling directories are tried in sequence until
  294.  * spooling succeeds completely in one of them.  Thus, alternative
  295.  * directories are useful to prevent loss of mail when filesystems fill
  296.  * up, or run out of inodes, or even when somebody accidentally changes
  297.  * permissions on one spool directory or its associated locking directory.
  298.  * In general, alternative directories should be on separate filesystems,
  299.  * perhaps even separate disks, if you are really paranoid.
  300.  *
  301.  * Of particular use is having more than one spool directory after
  302.  * an extended period of down-time to handle the suddenly increased
  303.  * influx of mail traffic.
  304.  *
  305.  * NOTE: This can be set with the config file value "spool_dirs"
  306.  *
  307.  * # define SPOOL_DIRS    "/usr/smail/spool" (* alternate suggestion *)
  308.  * # define SPOOL_DIRS    "/usr/smail/spool:/alt/smail/spool" (* Example *)
  309.  */
  310. #ifndef    SPOOL_DIRS
  311. # define SPOOL_DIRS    "/usr/spool/smail" /* Suggestion */
  312. #endif
  313.  
  314. /*
  315.  * Define the permission mode for spool files.  If a file descriptor
  316.  * locking protocol is used which requires that a file be writable to
  317.  * lock it, then this mode must allow at least write by owner (or group
  318.  * if the mailer is run as set group ID).  These should not allow for
  319.  * global read, as the messages stored in spool files should be considered
  320.  * private.
  321.  *
  322.  * NOTE: This can be set with the config file value "spool_mode"
  323.  */
  324. #ifndef    SPOOL_MODE
  325. # ifdef    UNIX_SYS5
  326. #  define SPOOL_MODE    0600
  327. # else
  328. #  define SPOOL_MODE    0400
  329. # endif
  330. #endif
  331.  
  332. /*
  333.  * define the permission modes for lock files.  If the LOCK_BY_NAME
  334.  * locking protocol is not used, then this is not of any value.
  335.  *
  336.  * NOTE: This can be set with the config file value "lock_mode" 
  337.  */
  338. #ifndef    LOCK_MODE
  339. # define LOCK_MODE 0444
  340. #endif
  341.  
  342. /*
  343.  * define AUTO_MKDIR to be TRUE if spool and log directories should
  344.  * be created automatically when smail fails to access them.  This
  345.  * behavior allows smail to essentially automatically install itself
  346.  * as long as the binaries are in place.  AUTO_MKDIR_MODE should be
  347.  * set to the mode used for directory creation.
  348.  */
  349. #ifndef AUTO_MKDIR
  350. # define AUTO_MKDIR  TRUE
  351. #endif
  352.  
  353. #ifndef    AUTO_MKDIR_MODE
  354. # define AUTO_MKDIR_MODE  0755
  355. #endif
  356.  
  357. /*
  358.  * define the permission modes for the per-message log files.
  359.  *
  360.  * NOTE: This can be set with the config file value "message_log_mode" 
  361.  */
  362. #ifndef    MESSAGE_LOG_MODE
  363. # define MESSAGE_LOG_MODE 0644
  364. #endif
  365.  
  366. /*
  367.  * Name the user that is to receive mail to the Postmaster, by default.
  368.  * This address is used, if no director matches Postmaster, to ensure
  369.  * that this address will always reach somebody.
  370.  */
  371. #ifndef POSTMASTER_ADDRESS
  372. # define POSTMASTER_ADDRESS "root"
  373. #endif
  374.  
  375. /*
  376.  * Defining ERROR_COPY_POSTMASTER to TRUE will cause all error message
  377.  * generated by smail to be copied to the postmaster.  Normally, mail
  378.  * will be copied to the postmaster only on selective errors that
  379.  * appear to be related to local configuration errors.
  380.  */
  381.  
  382. #if !defined(ERROR_COPY_POSTMASTER)
  383. # define ERROR_COPY_POSTMASTER    FALSE    /* don't copy the postmaster */
  384. #endif
  385.  
  386. /*
  387.  * This defines the default grade for spool files. These grade
  388.  * characters are used in a form similar to 4.3BSD UUCP grade
  389.  * values.  Typically, this is `C'.  See the definition of the GRADES
  390.  * attribute.
  391.  *
  392.  * NOTE: This can be set with the config file value "spool_grade"
  393.  */
  394. #ifndef    SPOOL_GRADE
  395. # define SPOOL_GRADE    'C'
  396. #endif
  397.  
  398. /*
  399.  * On systems without an atomic rename system call, configuration files
  400.  * are not guarranteed to always exist.  Thus, we must sleep and retry
  401.  * open operations several times before determining that a file really
  402.  * does not exist.  OPEN_INTERVAL defines the sleep interval between
  403.  * retries (in seconds) and OPEN_RETRIES defines the number of retries
  404.  * to be made in opening a file.
  405.  *
  406.  * For files that are optional, and which don't exist this is somewhat
  407.  * expensive and introduces delays into the process, but there is nothing
  408.  * that can be done.
  409.  *
  410.  * NOTE: These can be set with the config file values "open_interval" and
  411.  *     "open_retries"
  412.  *
  413.  * NOTES: for systems with an atomic rename, OPEN_RETRIES can be 0.
  414.  *      On systems without higher resolution timing, a sleep of
  415.  *      OPEN_INTERVAL is guarranteed to sleep at least
  416.  *      OPEN_INTERVAL-1 seconds.  Thus, this value should be at
  417.  *      least 2.
  418.  */
  419. #ifndef    OPEN_INTERVAL
  420. # define OPEN_INTERVAL    2
  421. #endif
  422. #ifndef    OPEN_RETRIES
  423. # ifdef HAVE_RENAME
  424. #  define OPEN_RETRIES 0
  425. # else
  426. #  define OPEN_RETRIES    2
  427. # endif
  428. #endif
  429.  
  430. /*
  431.  * The config file can be used to override some compiled in defaults of
  432.  * smail.  If this does not begin with `/', it will be referenced
  433.  * relative to the smail_lib_dir directory.
  434.  *
  435.  * NOTE: This cannot be set with the config file, for hopefully obvious
  436.  *     reasons.  This can be set on invocation of smail, however.
  437.  *
  438.  * # define CONFIG_FILE    "/usr/smail/lib/config" (* Alternate suggestion *)
  439.  */
  440. #ifndef    CONFIG_FILE
  441. # define CONFIG_FILE    "config"    /* Suggestion */
  442. #endif
  443.  
  444. /*
  445.  * A secondary configuration file can be used which overrides both
  446.  * internal configuration and configuration set in the primary configuration
  447.  * file.  This is useful, for example, in an environment using shared
  448.  * filesystems which may have a shared primary configuration and an
  449.  * optional secondary configuration.  If this is NULL, then no secondary
  450.  * configuration file used.
  451.  *
  452.  * NOTE: This can be set with the config file value "second_config_file"
  453.  */
  454. #ifndef SECOND_CONFIG_FILE
  455. # define SECOND_CONFIG_FILE  NULL
  456. #endif
  457.  
  458. /*
  459.  * The director file contains the complete configuration for the director
  460.  * subsystem.  It defines which director drivers are used, parameters
  461.  * affecting driver operation and use, and the order in which directors
  462.  * are called upon.  If this does not begin with `/', it will be
  463.  * referenced relative to the smail_lib_dir directory.
  464.  *
  465.  * If this file does not exist, or DIRECTOR_FILE is NULL, the compiled
  466.  * in defaults, defined in default.c, are used.
  467.  *
  468.  * NOTE: This can be set with the config file value "director_file"
  469.  *
  470.  * # define DIRECTOR_FILE "/usr/smail/lib/directors" (* alternate suggestion *)
  471.  */
  472. #ifndef    DIRECTOR_FILE
  473. # define DIRECTOR_FILE    "directors"    /* Suggestion */
  474. #endif
  475.  
  476. /*
  477.  * The router file contains the complete configuration for the routing
  478.  * subsystem.  It defines which route drivers are used, parameters
  479.  * affecting driver operation and use, and the order in which routers
  480.  * are called upon.  If this does not begin with `/', it will be
  481.  * referenced relative to the smail_lib_dir directory.
  482.  *
  483.  * If this file does not exist, or ROUTER_FILE is NULL, the compiled
  484.  * in defaults, defined in default.c, are used.
  485.  *
  486.  * NOTE: This can be set with the config file value "router_file"
  487.  *
  488.  * # define ROUTER_FILE    "/usr/smail/lib/routers" (* alternate suggestion *)
  489.  */
  490. #ifndef    ROUTER_FILE
  491. # define ROUTER_FILE    "routers"    /* Suggestion */
  492. #endif
  493.  
  494. /*
  495.  * Method files indicate the transport method by which mail is delivered
  496.  * to the next_hop site.  Method files can be indicated two ways in the
  497.  * ROUTER_FILE: by explicit `/' or `~user' based paths, and by non-rooted
  498.  * paths.  To find non-rooted method files, METHOD_DIR is pre-pended to
  499.  * the path.  Set to NULL if you do not wish to have a method directory.
  500.  * If this does not begin with `/', it will be referenced relative to
  501.  * the smail_lib_dir directory.
  502.  *
  503.  * NOTE: This can be set with the config file value "method_dir"
  504.  *
  505.  * # define METHOD_DIR    "/usr/smail/lib/methods" (* alternate suggestion *)
  506.  */
  507. #ifndef    METHOD_DIR
  508. # define METHOD_DIR    "methods"    /* Suggestion */
  509. #endif
  510.  
  511. /*
  512.  * The transport file contains the configuration for the transport
  513.  * subsystem.  It defines which transport drivers are used, and parameters
  514.  * affecting driver operation and use.  They are referenced from routers
  515.  * and some directors.  Also, two transports are referenced implicitly be
  516.  * smail's internal algorithms: "pipe" and "file" for delivery to
  517.  * shell-command and file addresses.  If this does not begin with `/',
  518.  * it will be referenced relative to the smail_lib_dir directory.
  519.  *
  520.  * If this file does not exist, or TRANSPORT_FILE is NULL, the compiled
  521.  * in defaults, defined in default.c, are used.
  522.  *
  523.  * NOTE: This can be set with the config file value "transport_file"
  524.  *
  525.  * #define TRANSPORT_FILE "/usr/smail/lib/transports" (* alternate *)
  526.  */
  527. #ifndef    TRANSPORT_FILE
  528. # define TRANSPORT_FILE   "transports"    /* Suggestion */
  529. #endif
  530.  
  531. /*
  532.  * The qualify file contains a list of hosts and the domains that they
  533.  * live in.  It is searched sequentially.
  534.  *
  535.  * NOTE: This can be set with the config file value "qualify_file"
  536.  *
  537.  * #define QUALIFY_FILE "/usr/smail/lib/qualify" (* alternate *)
  538.  */
  539. #ifndef QUALIFY_FILE
  540. # define QUALIFY_FILE   "qualify"  /* Suggestion */
  541. #endif
  542.  
  543. /*
  544.  * The retry file contains a list of hostname patterns, the time
  545.  * to wait between retries, and the total time to attempt retries
  546.  * before the address is considered undeliverable.
  547.  *
  548.  * NOTE: This can be set with the config file value "retry_file"
  549.  *
  550.  * #define RETRY_FILE "/usr/smail/lib/retry" (* alternate *)
  551.  */
  552. #ifndef RETRY_FILE
  553. # define RETRY_FILE   "retry"  /* Suggestion */
  554. #endif
  555.  
  556. /*
  557.  * The smail library directory is the default directory for various
  558.  * configuration files.  Also, files accessed through the routines in
  559.  * lookup.c may be referenced relative to this directory by default.
  560.  *
  561.  * NOTE: This can be set with the config file value "smail_lib_dir",
  562.  *     though CONFIG_FILE is always referenced relative to the compiled
  563.  *     in lib directory, for hopefully obvious reasons.
  564.  *
  565.  * #define SMAIL_LIB_DIR "/usr/smail/lib"    (* Alternate Suggestion *)
  566.  */
  567. #ifndef SMAIL_LIB_DIR
  568. # define SMAIL_LIB_DIR    "/usr/lib/smail"    /* Suggestion */
  569. #endif
  570.  
  571. /*
  572.  * The smail utility directory, which contains, among other programs,
  573.  * mkdbm and mkaliases.
  574.  *
  575.  * This can be changed with the EDITME variable UTIL_BIN_DIR.
  576.  */
  577.  
  578. #ifndef SMAIL_UTIL_DIR
  579. # define SMAIL_UTIL_DIR    SMAIL_LIB_DIR
  580. #endif
  581.  
  582. /*
  583.  * Require that specified configuration files exist.  If this is
  584.  * defined as TRUE then non-existent configuration files are generally
  585.  * ignored.  If this defined as FALSE, non-existent configuration
  586.  * files will generate a panic.
  587.  */
  588. #ifndef REQUIRE_CONFIGS
  589. # define REQUIRE_CONFIGS FALSE
  590. #endif
  591.  
  592. /*
  593.  * Allow debugging to be used in SMTP dialogs.  This allows the
  594.  * remote end to see the debugging output from smail, but does not
  595.  * have any other affects.  If this is TRUE, the DEBUG command in
  596.  * SMTP turns on debugging and sets its level.  If this is FALSE,
  597.  * the DEBUG command only produces a cute message.  This is only
  598.  * useful if NODEBUG is not defined.
  599.  */
  600. #ifndef SMTP_DEBUG
  601. # define SMTP_DEBUG    TRUE        /* probably reasonable */
  602. /*# define SMTP_DEBUG    FALSE        */
  603. #endif    /* SMTP_DEBUG */
  604.  
  605. /*
  606.  * Set this to a string which will be expanded to form the
  607.  * Received: header field.
  608.  *
  609.  * NOTE: This can be set with the config file value "received_field"
  610.  */
  611. #ifndef    RECEIVED_FIELD
  612. # define RECEIVED_FIELD \
  613. "Received: ${if def:sender_host\
  614. {from $sender_host by $primary_name\
  615. ${if def:sender_proto: with $sender_proto}\
  616. \n\t(Smail$version #$compile_num) }\
  617. else {by $primary_name ${if def:sender_proto:with $sender_proto }\
  618. (Smail$version #$compile_num)\n\t}}\
  619. id $message_id; $spool_date"
  620. #endif
  621.  
  622. /*
  623.  * Set this to a string which will be expanded to form the
  624.  * Message-Id: header field.
  625.  *
  626.  * NOTE: This can be set with the config file value "message_id_field"
  627.  */
  628. #ifndef    MESSAGE_ID_FIELD
  629. # define MESSAGE_ID_FIELD "Message-Id: <$message_id@$primary_name>"
  630. #endif
  631.  
  632. /*
  633.  * Set this to a string which will be expanded to form the
  634.  * Date: header field.
  635.  *
  636.  * NOTE: This can be set with the config file value "date_field"
  637.  */
  638. #ifndef    DATE_FIELD
  639. # define DATE_FIELD    "Date: $spool_date"
  640. #endif
  641.  
  642. /*
  643.  * Set this to a string which will be expanded to form the
  644.  * From: header field.
  645.  *
  646.  * NOTE: This can be set with the config file value "from_field"
  647.  */
  648. #ifndef    FROM_FIELD
  649. # define FROM_FIELD    "From: $sender${if def:sender_name: ($sender_name)}"
  650. #endif
  651.  
  652. /*
  653.  * Set this to a string which will be expanded to form the
  654.  * Return-Path: header field.
  655.  *
  656.  * NOTE: This can be set with the config file value "return_path_field"
  657.  */
  658. #ifndef    RETURN_PATH_FIELD
  659. # define RETURN_PATH_FIELD "Return-Path: <$sender>"
  660. #endif
  661.  
  662. /*
  663.  * SMTP startup banner message
  664.  */
  665. #ifndef SMTP_BANNER
  666. # define SMTP_BANNER "$primary_name Smail$version #$compile_num ready at $date"
  667. #endif
  668.  
  669. /*
  670.  * Maximum number of allowed smtp connection processes forked by the
  671.  * smtp daemon.
  672.  *
  673.  * NOTE: This can be set with the config file value "smtp_accept_max".
  674.  */
  675. #ifndef SMTP_ACCEPT_MAX
  676. # define SMTP_ACCEPT_MAX    0    /* allow an infinite number */
  677. #endif
  678.  
  679. /*
  680.  * Maximum number of allowed smtp connection processes forked by the
  681.  * smtp daemon, until only message queuing is allowed.
  682.  *
  683.  * NOTE: This can be set with the config file value "smtp_accept_queue".
  684.  */
  685. #ifndef SMTP_ACCEPT_QUEUE
  686. # define SMTP_ACCEPT_QUEUE    0    /* allow an infinite number */
  687. #endif
  688.  
  689. /*
  690.  * Number of seconds to wait for receipt of SMTP commands for interactive
  691.  * SMTP receiver processes.  The default value is in accordance with the
  692.  * recommendations of RFC1123.
  693.  */
  694.  
  695. #ifndef SMTP_RECEIVE_COMMAND_TIMEOUT
  696. # define SMTP_RECEIVE_COMMAND_TIMEOUT    (5*60)    /* five minutes */
  697. #endif
  698.  
  699. /*
  700.  * Number of seconds to wait for receipt of a message from a data
  701.  * command within an SMTP receiver process.
  702.  *
  703.  * NOTE:  RFC1123 appears to be silent on a recommendation for this
  704.  * value.
  705.  */
  706.  
  707. #ifndef SMTP_RECEIVE_MESSAGE_TIMEOUT
  708. # define SMTP_RECEIVE_MESSAGE_TIMEOUT    (2*60*60)    /* 2 hours */
  709. #endif
  710.  
  711. /*
  712.  * Set this to a string defining the mode to use for delivery of new
  713.  * incoming mail messages.  It should be one of:
  714.  *
  715.  * "foreground"        - deliver without forking a new process
  716.  * "background"        - fork a child to do delivery and don't wait for it
  717.  * "queue"        - do not perform delivery, just write the spool file
  718.  *
  719.  * NOTE: This can be set with the config file value "delivery_mode"
  720.  */
  721. #ifndef DELIVERY_MODE
  722. # define DELIVERY_MODE "background"
  723. #endif
  724.  
  725. /*
  726.  * Define the required effective user id for mail that is to be
  727.  * delivered after being queued.  If the effective user ID when
  728.  * smail is executed does not equal this number, then mail messages
  729.  * can be queued, but will not be delivered until a later queue
  730.  * run.
  731.  *
  732.  * This should normally be 0 (root), since smail is not likely to
  733.  * be able to deliver mail messages successfully unless it is run
  734.  * as root.
  735.  *
  736.  * If REQUIRED_EUID is not defined, then no check will be performed,
  737.  * and any delivery mode will be allowed.
  738.  */
  739. #if !defined(REQUIRED_EUID) && !defined(NO_REQUIRED_UID)
  740. # define REQUIRED_EUID        0    /* must be superuser */
  741. #endif
  742.  
  743. /*
  744.  * the mailbox file locking protocol requires a retry count and interval
  745.  * for creating lock files.  This is used by the file driver called by
  746.  * the "file" transport and, possibly, the "local" transport
  747.  *
  748.  * NOTE:  These can be changed in config file by setting "fnlock_retries"
  749.  *      and "fnlock_interval"
  750.  */
  751. #ifndef    FNLOCK_RETRIES
  752. # define FNLOCK_RETRIES        5    /* up to five retries */
  753. #endif
  754.  
  755. #ifndef    FNLOCK_INTERVAL
  756. # define FNLOCK_INTERVAL    3    /* at three second intervals */
  757. #endif
  758.  
  759. /*
  760.  * This octal permission mode is used in creating mailbox lock files
  761.  *
  762.  * NOTE: This can be set with the config file value "fnlock_mode"
  763.  */
  764. #ifndef    FNLOCK_MODE
  765. # define FNLOCK_MODE    0666        /* everybody can read and write */
  766. #endif
  767.  
  768. /*
  769.  * Define a nobody user ID and group ID for defining default access
  770.  * permissions.  This is often used by directors and routers and
  771.  * transports that call external programs where no other uid/gid has
  772.  * been given.
  773.  *
  774.  * if NOBODY_UID and NOBODY_GID are < 0, but NOBODY is non-NULL,
  775.  * then getpwnam(3) is called to obtain the uid and gid.
  776.  *
  777.  * NOTE: This can be set with the config file value "nobody"
  778.  *
  779.  * #define NOBODY_UID    11        (* uid "nobody" on namei *)
  780.  * #define NOBODY_GID    90        (* gid "guest" on namei *)
  781.  */
  782. #ifndef    NOBODY_UID
  783. # define NOBODY_UID    (-1)        /* compute the nobody_uid */
  784. #endif    /* NOBODY_UID */
  785.  
  786. #ifndef    NOBODY_GID
  787. # define NOBODY_GID    (-1)        /* compute the nobody_gid */
  788. #endif    /* NOBODY_GID */
  789.  
  790. #ifndef    NOBODY
  791. # if    defined(UNIX_BSD4_3) || defined(sun)
  792. #  define NOBODY    "nobody"    /* 4.3BSD has a standard for this */
  793. # else
  794. #  define NOBODY    "guest"      /* patch this with something reasonable */
  795. # endif
  796. #endif
  797.  
  798. /*
  799.  * Set SENDER_ENV_VARIABLE to name an environment variable that can
  800.  * be used to name the calling user.  For System V systems this can be
  801.  * set to LOGNAME.  For BSD systems, this can be set to USER.
  802.  */
  803.  
  804. #ifndef SENDER_ENV_VARIABLE
  805. /* # define SENDER_ENV_VARIABLE        "LOGNAME" /* for System V */
  806. /* # define SENDER_ENV_VARIABLE        "USER" /* for BSD */
  807. #define SENDER_ENV_VARIABLE        NULL    /* no default defined */
  808. #endif
  809.  
  810. /*
  811.  * Set RETRY_INTERVAL to the default minimum interval, in seconds,
  812.  * between a deferred delivery and the subsequent retry.
  813.  * Set RETRY_DURATION to the default maximum duration of retries for
  814.  * a given address.
  815.  */
  816.  
  817. #ifndef RETRY_INTERVAL
  818. # define RETRY_INTERVAL (10 * 60L)     /* ten minutes */
  819. #endif
  820. #ifndef RETRY_DURATION
  821. # define RETRY_DURATION (5 * (24 * 60L * 60L))    /* five days */
  822. #endif
  823.  
  824. /*
  825.  * Set HOST_LOCK_TIMEOUT to the default timeout, in seconds, for
  826.  * use when trying to lock a retry file for exclusive delivery
  827.  * to a given host.
  828.  */
  829.  
  830. #ifndef HOST_LOCK_TIMEOUT
  831. # define HOST_LOCK_TIMEOUT 30L
  832. #endif
  833.  
  834. /*
  835.  * Set SMAIL to the location of the `smail' program.  This filename is
  836.  * used when smail wants to re-exec itself to completely reinitialize
  837.  * its state.
  838.  *
  839.  * NOTE: This can be set with the config file value "smail"
  840.  *
  841.  * #define SMAIL "/usr/lib/smail/smail"    (* potentially useful setting *)
  842.  * #define SMAIL "/usr/smail/lib/smail"    (* alternate suggestion *)
  843.  */
  844. #ifndef    SMAIL
  845. # define SMAIL "/usr/lib/sendmail"    /* Suggestion */
  846. #endif
  847.  
  848. /*
  849.  * We can directly deliver a mail message by forking a new smail process
  850.  * each time we receive one when the load average is <= MAX_LOAD_AVE.
  851.  * When the load average is > MAX_LOAD_AVE, all incoming messages are spooled
  852.  * for later processing.  Spooling mail messages helps reduce the load on the
  853.  * system while delaying mail delivery.
  854.  *
  855.  * The load average is taken from the 5 minute load average.  On systems
  856.  * that do not compute load average, a value of 0 is always assumed.
  857.  *
  858.  * Set this value to 0 if you always wish to always with directly deliver
  859.  * messages.  The MAX_LOAD_AVE on systems that compute the load average
  860.  * should be set to a value where the response time becomes poor for
  861.  * interactive users.
  862.  *
  863.  * 0 is a magic value which cause the load average not to be computed at
  864.  * all.
  865.  *
  866.  * NOTE: This can be set with the config file value "max_load_ave"
  867.  *
  868.  * NOTE: Load-average computation is not currently supported.
  869.  */
  870. #ifndef    MAX_LOAD_AVE
  871. # define MAX_LOAD_AVE    0
  872. #endif
  873.  
  874. /*
  875.  * Normal users cannot set the sender for mail.  However, daemons need
  876.  * to be able to do this.  The TRUSTED string defines which users are
  877.  * allowed to supply a sender explicitly.  If it is NULL, then anybody
  878.  * can supply a sender string.
  879.  *
  880.  * Trusted users should include the real-user-id under which programs
  881.  * like rmail (via uux/uuxqt) or sendmail (via inetd) execute.  Often
  882.  * this means root, uucp and daemon.
  883.  *
  884.  * The symbol TRUSTED is a colon-separated list of trusted users.
  885.  *
  886.  * NOTE: This can be set with the config file value "trusted"
  887.  *
  888.  * EXTREME CAUTION:
  889.  *    Currently, the UUCP subsystem does not change real uids when
  890.  *    executing programs.  Since smail can only use the real uid
  891.  *    to verify users (assuming it runs setuid), it has no way of
  892.  *    verifying absolutely for certain that UUCP submitted mail
  893.  *    received from a remote site as opposed to a user that simply
  894.  *    initiated a UUCP transaction.
  895.  *       Unless you are certain that your UUCP (and other transport
  896.  *    agents) will always set the real uid to something smail will
  897.  *    recognize as trusted, you should turn off the TRUSTED attribute
  898.  *    by setting it to NULL.
  899.  *
  900.  *       Depending upon your situation, trusted groups may be
  901.  *    sufficient for your needs.  See below.
  902.  *
  903.  * #define TRUSTED "root:uucp:daemon"    (* The nominal setting *)
  904.  */
  905. #ifndef    TRUSTED
  906. # define TRUSTED NULL            /* Disable use of trusted */
  907. #endif
  908.  
  909. /*
  910.  * Smail can use the effective gid under which the mailer was invoked
  911.  * to perform trusted user verification.  This is a better solution,
  912.  * in general for programs such as uucp that do not change their real
  913.  * uid (in many implementations).  By ensuring that uucp is always
  914.  * invoked with a reasonable group, in this colon-separated list,
  915.  * verification can be performed.  Be sure that all trusted pathways
  916.  * into the mailer have an entry in either TRUSTED or TRUSTED_GROUPS,
  917.  * or the results are worse than setting TRUSTED and TRUSTED_GROUPS to
  918.  * NULL.  After all, these only affect the ability to forge sender
  919.  * lines, which is pretty easy to do anyway.  (just connect to an SMTP
  920.  * socket on another machine and you can forge all the mail you want).
  921.  *
  922.  * #define TRUSTED "uucp:wheel"        (* a potentially nominal setting *)
  923.  */
  924. #ifndef TRUSTED_GROUPS
  925. # define TRUSTED_GROUPS NULL
  926. #endif
  927.  
  928. /*
  929.  * if your machine handles large data areas efficiently, then making
  930.  * MESSAGE_BUF_SIZE the maximum size of a message will minimize i/o
  931.  * overhead for reading and writing the message.  Systems with a
  932.  * small amount of memory or poor VM systems cannot afford large buffers.
  933.  * Larger memory systems can set the buffer size to less than
  934.  * MAX_MESSAGE_SIZE at the expense of more i/o on large mail messages.
  935.  *
  936.  * NOTE: This can be set with the config file value "message_buf_size"
  937.  */
  938. #ifndef    MESSAGE_BUF_SIZE
  939. # ifdef    SMALL_MEMORY
  940. #  define MESSAGE_BUF_SIZE    BUFSIZ
  941. # else
  942. #  define MESSAGE_BUF_SIZE    MAX_MESSAGE_SIZE
  943. # endif
  944. #endif
  945.  
  946. /*
  947.  * Number of entries in address hit table.  The larger the number the
  948.  * greater the space but the greater the efficiency.
  949.  *
  950.  * NOTE: This can be set with the config file value "hit_table_len"
  951.  */
  952. #ifndef HIT_TABLE_LEN
  953. # define HIT_TABLE_LEN    241        /* suitable for large mailing lists */
  954. #endif
  955.  
  956. /*
  957.  * If you wish to use the % operator in preference to the ! operator,
  958.  * define SWITCH_PERCENT_AND_BANG to be TRUE.  This switch happens
  959.  * only for addresses that have % and ! operators in the local-part of
  960.  * a local-part@domain address.
  961.  *
  962.  * See the parse_address() function in addr.c for a complete description
  963.  * of how this affects smail.
  964.  *
  965.  * SWITCH_PERCENT_AND_BANG should be defined as either TRUE or FALSE.
  966.  */
  967.  
  968. #ifndef SWITCH_PERCENT_AND_BANG
  969. #define SWITCH_PERCENT_AND_BANG    FALSE
  970. #endif
  971.  
  972.  
  973. /*
  974.  * DEFAULT DIRECTOR CONFIGURATION
  975.  *
  976.  * This section adjusts the default director configuration compiled into
  977.  * smail.  See default.c for the complete default configuration source.
  978.  *
  979.  * NOTE:  The existence of a direcor configuration file replaces all of
  980.  *      this configuration.
  981.  */
  982.  
  983. /*
  984.  * configuration for the default aliases director
  985.  *
  986.  * If you wish to have an aliases director by default, define
  987.  * ALIASES_FILE to be the name of a sorted file, and ALIASES_PROTO
  988.  * to be the database access protocol to use in searching this file
  989.  * See the file lookup.c for a complete list of these protocols.  If
  990.  * this does not begin with `/', it will be referenced relative to the
  991.  * smail_lib_dir directory.
  992.  *
  993.  * A partial list is:
  994.  *
  995.  * lsearch - perform linear searches on raw alias files.  This is slow
  996.  *         unless the aliases file is small.
  997.  * bsearch - perform binary searches on sorted alias files with one
  998.  *         alias rule per line.
  999.  * dbm       - use the Berkeley dbm(3X) or ndbm(3X) libraries to search
  1000.  *         for aliases.
  1001.  * yp       - use Sun's YP service to search for aliases.  This requires
  1002.  *         the existence of the YP library routines.
  1003.  * aliasyp - use Sun's YP service in a manner compatible with standard
  1004.  *         Sun mail.aliases YP databases.  These do not exactly match
  1005.  *         the semantics of other YP databases in that they count an
  1006.  *         the ending nul byte in the length of keys.  There is a
  1007.  *         tool distributed with smail (mkline) that can be used to
  1008.  *         create regular YP databases, for use with the `yp' proto.
  1009.  *
  1010.  * #define ALIASES_FILE    "/usr/lib/smail/aliases" (* Suggestion *)
  1011.  * #define ALIASES_FILE    "/usr/smail/lib/aliases" (* alternate *)
  1012.  */
  1013. #if    !defined(ALIASES_FILE) && !defined(NO_ALIASES_FILE)
  1014. # ifdef HAVE_YP
  1015. #  define ALIASES_FILE "mail.aliases"    /* Standard YP aliases map */
  1016. # else
  1017. #  define ALIASES_FILE "/usr/lib/aliases" /* sendmail compatible name */
  1018. # endif
  1019. #endif
  1020. #ifndef    ALIASES_PROTO
  1021. # ifdef HAVE_YP
  1022. #  define ALIASES_PROTO "aliasyp"    /* use Sun's YP aliases service */
  1023. # else
  1024. #  define ALIASES_PROTO "lsearch"    /* This should work on any UN*X os */
  1025. # endif
  1026. #endif
  1027.  
  1028. /*
  1029.  * In some environments where smail is being integrated into new systems
  1030.  * it may be convenient to make the aliases file optional, so that if
  1031.  * the file does not exist, it is assumed to be empty.  To enable this
  1032.  * behavior define the name below.
  1033.  */
  1034. #if    !defined(ALIASES_OPTIONAL) && !defined(NO_ALIASES_OPTIONAL)
  1035. # ifndef HAVE_YP
  1036. #  define ALIASES_OPTIONAL        /*  */
  1037. # endif
  1038. #endif
  1039.  
  1040. /*
  1041.  * In some cases, failure to open an aliases database can be considered
  1042.  * a temporary failure which can be recovered from by retrying the open
  1043.  * at a later time.  One example would be use of YP where the server
  1044.  * host may be down.  To enable this behavior, define the name below.
  1045.  */
  1046. #if    !defined(ALIASES_TRYAGAIN) && !defined(NO_ALIASES_TRYAGAIN)
  1047. # ifdef HAVE_YP
  1048. #  define ALIASES_TRYAGAIN        /*  */
  1049. # endif
  1050. #endif
  1051.  
  1052. /*
  1053.  * configuration for the default dotforward director
  1054.  *
  1055.  * If you do not wish to support ~/.forward files, for some strange
  1056.  * reason, define DISABLE_DOTFORWARD.  forward files in smail are handled
  1057.  * in a reasonable manner which should prevent use of .forward files for
  1058.  * trojan horse attacks.  For example, if correctly configured home
  1059.  * directories accessible by remote hosts can't be used to write files or
  1060.  * exec programs.
  1061.  */
  1062. #if    !defined(DISABLE_DOTFORWARD) && !defined(NO_DISABLE_DOTFORWARD)
  1063. /*#define DISABLE_DOTFORWARD /* */
  1064. #endif
  1065.  
  1066. /*
  1067.  * The following list should define all home directories known to be
  1068.  * accessible from remote hosts, so that care can be taken for
  1069.  * .forward files found in these places.
  1070.  */
  1071. #ifndef REMOTE_HOMES
  1072. # define REMOTE_HOMES "~nuucp:~uucp:~ftp:/tmp:/usr/tmp"
  1073. #endif
  1074.  
  1075. /*
  1076.  * configuration for the default forwardto director
  1077.  *
  1078.  * If you wish to support users putting "Forward to " lines at the
  1079.  * beginning of their mailbox files to indicate forwarding, then
  1080.  * define how to find these mailbox files.  System V mailers currently
  1081.  * do not have any other means of specifying forwarding information
  1082.  * for users.  This maintains compatibility with this system.
  1083.  */
  1084. #if    !defined(FORWARDTO_FILE) && !defined(NO_FORWARDTO_FILE)
  1085. # ifdef LOCAL_MAIL_FILE
  1086. #  define FORWARDTO_FILE LOCAL_MAIL_FILE
  1087. # else
  1088. #  ifdef UNIX_SYS5
  1089. #   define FORWARDTO_FILE "/usr/mail/${lc:user}"
  1090. #  else
  1091. #   define FORWARDTO_FILE "/usr/spool/mail/${lc:user}"
  1092. #  endif
  1093. # endif
  1094. #endif
  1095.  
  1096. /*
  1097.  * configuration for the default mailing list director
  1098.  *
  1099.  * A variation on the forwardfile driver can be used to define a
  1100.  * directory which contains mailing list files.  By simply creating
  1101.  * a file in a directory a mailing list will have been defined.
  1102.  * aliases, forward files and local usernames have precedence over
  1103.  * these mailing list files, so it is safe to allow general users
  1104.  * access to this directory (e.g., users cannot use this directory
  1105.  * to steal mail from other users on the local host).
  1106.  *
  1107.  * In the spirit of allowing general users access to this file, the
  1108.  * caution and nobody attributes are turned on.  This prevents worries
  1109.  * about users being able to put shell command and file addresses in
  1110.  * these files and accessing things that they shouldn't.  However, it
  1111.  * still allows users the convenience of specifying files and shell
  1112.  * commands as destinations.
  1113.  *
  1114.  * Under a 4.3BSD system or a Sun running SunOS3.0 or higher, it is
  1115.  * reasonable to set the sticky bit on this directory.  In this case a
  1116.  * user will be able to create a file here with assurance that other
  1117.  * users will not be able to remove rename it.  However, any system
  1118.  * that is comfortable with normal UN*X /tmp and /usr/tmp semantics,
  1119.  * should also be comfortable with a globally writable mailing list
  1120.  * directory.  If this does not begin with `/', it will be referenced
  1121.  * relative to the smail_lib_dir directory.
  1122.  *
  1123.  * #define LIST_FILENAME "/usr/smail/lists/${lc:user}" (* alternative *)
  1124.  */
  1125. #if    !defined(LIST_FILENAME) && !defined(NO_LIST_FILENAME)
  1126. # define LIST_FILENAME "lists/${lc:user}"    /* suggested pathname */
  1127. #endif
  1128.  
  1129. /*
  1130.  * configuration for the default smartuser director
  1131.  *
  1132.  * Smail can be configured to send mail destined to an unknown user to
  1133.  * a remote site that supposedly understands more usernames than does
  1134.  * the local host.  By defining an address to which mail to unknown
  1135.  * users should be sent, this can be accomplished.  This address should
  1136.  * contain a $user where the local address is inserted into the address.
  1137.  *
  1138.  * If SMART_USER is set to NULL, then a smartuser director is configured
  1139.  * which will read the variable smart_user which can be set in the
  1140.  * config file.  The default value of the smart_user variable can be
  1141.  * specified as CONFIG_SMART_USER.  This enables a smart_user director
  1142.  * to be compiled in while the address for the smart_user director is
  1143.  * still modifiable through configuration.
  1144.  *
  1145.  * #define SMART_USER "$user@amdahl.uts.amdahl.com" (* sample setting *)
  1146.  */
  1147. #if    !defined(SMART_USER) && !defined(NO_SMART_USER)
  1148. # define SMART_USER NULL        /* normal setting */
  1149. #endif
  1150.  
  1151. #ifndef    CONFIG_SMART_USER
  1152. # define CONFIG_SMART_USER  NULL
  1153. #endif
  1154.  
  1155.  
  1156. /*
  1157.  * DEFAULT ROUTER CONFIGURATION
  1158.  *
  1159.  * This section adjusts the default router configuration compiled into
  1160.  * smail.  See default.c for the complete default configuration source.
  1161.  *
  1162.  * NOTE:  The existence of a router configuration file replaces all of
  1163.  *      this configuration.
  1164.  */
  1165.  
  1166. /*
  1167.  * There is currently no support for method files from the compiled in
  1168.  * smail configuration.  However, a hardcoded method table can be used
  1169.  * by defining USE_METHOD_TABLE.  If defined, all of the routers will
  1170.  * use this table in addition to their default associated transport.
  1171.  * In the future, smail may support method files from compiled in
  1172.  * configuration.
  1173.  */
  1174. #if    !defined(USE_METHOD_TABLE) && !defined(NO_USE_METHOD_TABLE)
  1175. /*# define USE_METHOD_TABLE        /*  */
  1176. #endif
  1177.  
  1178. /*
  1179.  * Default gethostbyaddr router setup
  1180.  *
  1181.  * If defined, a gethostbyaddr router will be configured which recognizes
  1182.  * hostnames such as [192.2.12.142] and delivers via SMTP to that IP
  1183.  * address.  This requires that the gethostbyaddr driver be configured
  1184.  * in by the conf/driver.cf configuration file.  This in turn requires
  1185.  * the a BSD-compatible networking library.
  1186.  */
  1187. #ifdef HAVE_BSD_NETWORKING
  1188. # if    !defined(USE_GETHOSTBYADDR) && !defined(NO_USE_GETHOSTBYADDR)
  1189. #  define USE_GETHOSTBYADDR        /*  */
  1190. # endif
  1191. #endif
  1192.  
  1193. /*
  1194.  * GETHOSTBYADDR_TRANSPORT defines the default transport used for hosts
  1195.  * matched with the pathalias router.
  1196.  *
  1197.  * #define GETHOSTBYADDR_TRANSPORT  "inet_zone_smtp" (* alternate suggestion *)
  1198.  */
  1199. #ifndef GETHOSTBYADDR_TRANSPORT
  1200. # define GETHOSTBYADDR_TRANSPORT "smtp"
  1201. #endif
  1202.  
  1203. /*
  1204.  * Default gethostbyname router setup
  1205.  *
  1206.  * If defined, a gethostbyname router will be configured which calls
  1207.  * gethostbyname(3N) to match hosts accessible over TCP/IP.  This requires
  1208.  * that the gethostbyaddr driver be configured in by the conf/driver.cf
  1209.  * configuration file.  This in turn requires the a BSD-compatible
  1210.  * networking library.
  1211.  */
  1212. #ifdef HAVE_BSD_NETWORKING
  1213. # if    !defined(USE_GETHOSTBYNAME) && !defined(NO_USEGETHOSTBYNAME)
  1214. #  define USE_GETHOSTBYNAME        /*  */
  1215. # endif
  1216. #endif
  1217.  
  1218. /*
  1219.  * GETHOSTBYNAME_TRANSPORT defines the default transport used for hosts
  1220.  * matched with the pathalias router.
  1221.  *
  1222.  * #define GETHOSTBYNAME_TRANSPORT  "inet_zone_smtp" (* alternate suggestion *)
  1223.  */
  1224. #ifndef GETHOSTBYNAME_TRANSPORT
  1225. # define GETHOSTBYNAME_TRANSPORT "smtp"
  1226. #endif
  1227.  
  1228. /*
  1229.  * Default pathalias router setup
  1230.  *
  1231.  * If you wish to have a pathalias router by default, define PATHS_FILE
  1232.  * to be the name of a sorted paths file, and PATHS_PROTO to be the
  1233.  * database access protocol used for lookups.  See the file lookup.c
  1234.  * for a complete list of these protocols.    If this does not begin
  1235.  * with `/', it will be referenced relative to the smail_lib_dir
  1236.  * directory.  A current list is:
  1237.  *
  1238.  * lsearch - perform linear searches on raw path files.  This is slow
  1239.  *         unless the path file is small.
  1240.  * bsearch - perform binary searches on sorted path files with one
  1241.  *         path per line.
  1242.  * dbm       - use the Berkeley dbm(3X) or ndbm(3X) libraries to search
  1243.  *         for paths.
  1244.  * yp       - use Sun's YP service to search for paths.  This requires
  1245.  *         the existence of the YP library routines.
  1246.  *
  1247.  * #define PATHS_FILE    "/usr/smail/lib/paths" (* alternate suggestion *)
  1248.  */
  1249. #if    !defined(PATHS_FILE) && !defined(NO_PATHS_FILE)
  1250. # define PATHS_FILE    "paths"        /* Suggestion */
  1251. #endif
  1252. #ifndef    PATHS_PROTO
  1253. # define PATHS_PROTO    "bsearch"    /* Compatible with smail1.0 and 2.0 */
  1254. #endif
  1255.  
  1256. /*
  1257.  * In some environments where smail is being integrated into new systems
  1258.  * it may be convenient to make the paths file optional, so that if
  1259.  * the file does not exist, it is assumed to be empty.  To enable this
  1260.  * behavior define the name below.
  1261.  */
  1262. #if    !defined(PATHS_OPTIONAL) && !defined(NO_PATHS_OPTIONAL)
  1263. # define PATHS_OPTIONAL            /*  */
  1264. #endif
  1265.  
  1266. /*
  1267.  * In some cases, failure to open an paths database can be considered
  1268.  * a temporary failure which can be recovered from by retrying the open
  1269.  * at a later time.  One example would be use of YP where the server
  1270.  * host may be down.  To enable this behavior, define the name below.
  1271.  */
  1272. #if    !defined(PATHS_TRYAGAIN) && !defined(NO_PATHS_TRYAGAIN)
  1273. /*# define PATHS_TRYAGAIN        /*  */
  1274. #endif
  1275.  
  1276. /*
  1277.  * PATHS_TRANSPORT defines the default transport used for hosts matched
  1278.  * with the pathalias router.
  1279.  *
  1280.  * #define PATHS_TRANSPORT  "demand"    (* alternate suggestion *)
  1281.  */
  1282. #ifndef    PATHS_TRANSPORT
  1283. # define PATHS_TRANSPORT  "uux"        /* queue remote rmail requests */
  1284. #endif
  1285.  
  1286. /*
  1287.  * Default uuname router setup
  1288.  *
  1289.  * If you wish to obtain a list of neighbor sites from the UUCP programs,
  1290.  * define the command to extract the list of UUCP neighbor sites.
  1291.  */
  1292. #if    !defined(UUNAME_COMMAND) && !defined(NO_UUNAME_COMMAND)
  1293. # define UUNAME_COMMAND    "/usr/bin/uuname" /* should work almost everywhere */
  1294. #endif
  1295.  
  1296. /*
  1297.  * UUNAME_TRANSPORT defines the default transport used for hosts matched
  1298.  * with the uuname router.
  1299.  *
  1300.  * #define UUNAME_TRANSPORT  "demand"    (* alternate suggestion *)
  1301.  */
  1302. #ifndef UUNAME_TRANSPORT
  1303. # define UUNAME_TRANSPORT  "uux"    /* queue remote rmail requests */
  1304. #endif
  1305.  
  1306. /*
  1307.  * Default setup for the smarthost router
  1308.  *
  1309.  * If you wish to send unknown addresses to a remote host for routing,
  1310.  * define the path used to send mail to that host.  Ask the remote
  1311.  * site in question before setting this up.
  1312.  *
  1313.  * There is a hook in the config file that allows the path and perhaps
  1314.  * the transport used to be set in the configuration file.  This hook
  1315.  * can be enabled by setting SMART_PATH to NULL and CONFIG_SMART_PATH
  1316.  * to the initial value for the smart_path variable.  As well,
  1317.  * CONFIG_SMART_TRANSPORT can be set to the default value for the
  1318.  * smart_transport variable, though SMART_TRANSPORT can be used instead
  1319.  * in any case.
  1320.  *
  1321.  * Using CONFIG_SMART_PATH is the prefered method of setting up the
  1322.  * smarthost router as it does not rely on hard-coded information in
  1323.  * default.c.
  1324.  *
  1325.  * if SMART_PATH is undefined, no smarthost router will be configured.
  1326.  *
  1327.  * #define SMART_PATH  "namei!amdahl"    (* example path *)
  1328.  */
  1329. #if    !defined(SMART_PATH) && !defined(NO_SMART_PATH)
  1330. # define SMART_PATH NULL        /*  */
  1331. #endif
  1332.  
  1333. #if    !defined(CONFIG_SMART_PATH)
  1334. # define CONFIG_SMART_PATH NULL        /*  */
  1335. #endif
  1336.  
  1337. #if    !defined(CONFIG_SMART_TRANSPORT)
  1338. # define CONFIG_SMART_TRANSPORT NULL    /*  */
  1339. #endif
  1340.  
  1341. /*
  1342.  * SMART_TRANSPORT defines the default transport used for hosts matched
  1343.  * with the uuname router.
  1344.  *
  1345.  * #define SMART_TRANSPORT "demand"    (* alternate suggestion *)
  1346.  */
  1347. #if    !defined(SMART_TRANSPORT)
  1348. # define SMART_TRANSPORT "uux"        /* Suggestion */
  1349. #endif
  1350.  
  1351.  
  1352. /*
  1353.  * DEFAULT TRANSPORT CONFIGURATION
  1354.  *
  1355.  * This section adjusts the default transport configuration compiled into
  1356.  * smail.  See default.c for the complete default configuration source.
  1357.  *
  1358.  * NOTE:  The existence of a transport configuration file replaces all of
  1359.  *      this configuration.
  1360.  */
  1361.  
  1362. /*
  1363.  * Default setup for the local transport
  1364.  *
  1365.  * Smail can perform local delivery either by appending to mailboxes
  1366.  * by itself (only useful if it is setuid or setgid to something that
  1367.  * can do this, or if all mail is queued and smail performs all delivery
  1368.  * as a daemon).  Alternately, it can send messages to another program,
  1369.  * such as /bin/mail and have that program perform delivery.
  1370.  *
  1371.  * The method used depends upon what is set.  If LOCAL_MAIL_COMMAND
  1372.  * is set, it should be a command to be executed which will deliver
  1373.  * a message given on its standard input.  Otherwise LOCAL_MAIL_FILE
  1374.  * should be set to define which file should be appended to for
  1375.  * local mail delivery.  See the installation and operators guide
  1376.  * for information on what the command and filename strings look
  1377.  * like.
  1378.  *
  1379.  * #define LOCAL_MAIL_COMMAND "/path/prog $($user$)" (* custom program *)
  1380.  * #define LOCAL_MAIL_FILE "~/mbox"    (* Example: file in home directories *)
  1381.  */
  1382. #if    !defined(LOCAL_MAIL_COMMAND) && !defined(LOCAL_MAIL_FILE)
  1383.  
  1384. # ifdef USE_LOCAL_MAIL_COMMAND
  1385. #  define LOCAL_MAIL_COMMAND "/bin/mail -d $(${lc:user}$)" /* call program */
  1386. # endif
  1387.  
  1388. # ifndef LOCAL_MAIL_COMMAND
  1389. #  ifdef UNIX_SYS5
  1390. #   define LOCAL_MAIL_FILE "/usr/mail/${lc:user}" /* append to file */
  1391. #  else
  1392. #   define LOCAL_MAIL_FILE "/usr/spool/mail/${lc:user}" /* append to file */
  1393. #  endif
  1394. # endif
  1395. #endif
  1396.  
  1397. /*
  1398.  * if a program is used for local delivery, set LOCAL_MAIL_ADDRS to
  1399.  * the maximum number of addrs that the program can take.  Generally,
  1400.  * a program can either take one or can take many.
  1401.  */
  1402. #ifndef    LOCAL_MAIL_ADDRS
  1403. # define LOCAL_MAIL_ADDRS    100    /* pick any large number */
  1404. #endif
  1405.  
  1406. /*
  1407.  * if smail is doing delivery to mailbox files directly, these files will
  1408.  * be created with this mode.
  1409.  */
  1410. #ifndef LOCAL_MAIL_MODE
  1411. # ifdef UNIX_BSD
  1412. #  define LOCAL_MAIL_MODE    0600    /* only user can read/write mail */
  1413. # else
  1414. #  define LOCAL_MAIL_MODE    0660    /* mailboxes in restricted group */
  1415. # endif
  1416. #endif
  1417.  
  1418. /*
  1419.  * Setup for the queued uux transport
  1420.  *
  1421.  * The following command should call uux and queue a mail message
  1422.  * for transmission to a remote host.  Check your man page to see
  1423.  * if uux supports the -amailpath option, and also check to see
  1424.  * if you have the -ggrade option.  Smail can support both of these
  1425.  * quite nicely.
  1426.  */
  1427. #ifndef    QUEUED_UUX_COMMAND
  1428. # ifdef HAVE_HDB_UUCP
  1429. #  define QUEUED_UUX_COMMAND \
  1430.     "/usr/bin/uux - -r -a$sender -g$grade $host!rmail $(($user)$)"
  1431. # else
  1432. #  define QUEUED_UUX_COMMAND \
  1433.     "/usr/bin/uux - -r $host!rmail $(($user)$)"
  1434. # endif
  1435. #endif
  1436.  
  1437. /*
  1438.  * Setup for the demand uux transport
  1439.  *
  1440.  * The following command should call uux and queue a mail message
  1441.  * for transmission to a remote host and immediately attempt delivery.
  1442.  * Check your man page to see if uux supports the -amailpath option, and
  1443.  * also check to see if you have the -ggrade option.  Smail can support
  1444.  * both of these quite nicely.
  1445.  */
  1446. #ifndef    DEMAND_UUX_COMMAND
  1447. # ifdef HAVE_HDB_UUCP
  1448. #  define DEMAND_UUX_COMMAND \
  1449.     "/usr/bin/uux - -a$sender -g$grade $host!rmail $(($user)$)"
  1450. # else
  1451. #  define DEMAND_UUX_COMMAND \
  1452.     "/usr/bin/uux - $host!rmail $(($user)$)"
  1453. # endif
  1454. #endif
  1455.  
  1456. /*
  1457.  * Setup for the queued uusmtp transport
  1458.  *
  1459.  * The following command should call uux and queue a mail message
  1460.  * for transmission to a remote host.  It should invoke a program
  1461.  * on the remote host that reads batched SMTP requests from its
  1462.  * standard input.
  1463.  */
  1464. #ifndef    QUEUED_UUSMTP_COMMAND
  1465. # ifdef HAVE_HDB_UUCP
  1466. #  define QUEUED_UUSMTP_COMMAND \
  1467.     "/usr/bin/uux - -r -a$sender -g$grade $host!rsmtp"
  1468. # else
  1469. #  define QUEUED_UUSMTP_COMMAND \
  1470.     "/usr/bin/uux - -r $host!rsmtp"
  1471. # endif
  1472. #endif
  1473.  
  1474. /*
  1475.  * Setup for the demand uusmtp transport
  1476.  *
  1477.  * The following command should call uux and queue a mail message
  1478.  * for immediate transmission to a remote host.  It should invoke
  1479.  * a program on the remote host that reads batched SMTP requests
  1480.  * from its standard input.
  1481.  */
  1482. #ifndef    DEMAND_UUSMTP_COMMAND
  1483. # ifdef HAVE_HDB_UUCP
  1484. #  define DEMAND_UUSMTP_COMMAND \
  1485.     "/usr/bin/uux - -a$sender -g$grade $host!rsmtp"
  1486. # else
  1487. #  define DEMAND_UUSMTP_COMMAND \
  1488.     "/usr/bin/uux - $host!rsmtp"
  1489. # endif
  1490. #endif
  1491.  
  1492. /*
  1493.  * Setup for the smtp transport
  1494.  *
  1495.  * If you wish to configure the SMTP over TCP/IP transports
  1496.  * then define this.  If defined, four transports will be configured:
  1497.  *
  1498.  *    smtp        - default smtp transport (either INET or UUCP zone)
  1499.  *    uucp_zone_smtp    - smtp transport for UUCP zone
  1500.  *    inet_zone_smtp    - smtp transport for the Internet
  1501.  *    local_smtp    - smtp transport for coordinated local networks
  1502.  */
  1503. #ifdef HAVE_BSD_NETWORKING
  1504. # if    !defined(USE_SMTP_TRANSPORT) && !defined(NO_USE_SMTP_TRANSPORT)
  1505. #  define USE_SMTP_TRANSPORT
  1506. # endif
  1507. #endif
  1508.